// JavaScript Document
var speed = 30;
var demo2 = document.getElementById("demo2");
var demo1 = document.getElementById("demo1");
var demo = document.getElementById("demo");
demo.scrollLeft = demo.scrollWidth
function MarqueeLeft() {
	if (demo2.offsetWidth - demo.scrollLeft <= 0)
		demo.scrollLeft -= demo1.offsetWidth
else {
		demo.scrollLeft++
	}
}

function MarqueeRight() {
	if (demo.scrollLeft <= 0)
		demo.scrollLeft += demo2.offsetWidth
else {
		demo.scrollLeft--
	}
}
var MyMar = setInterval(MarqueeRight, speed);
demo.onmouseover = function() {
	clearInterval(MyMar);
}
demo.onmouseout = function() {
	MyMar = setInterval(MarqueeRight, speed);
}
function changeRedirect(i) {
	clearInterval(MyMar);
	if (i == 0) {
		MyMar = setInterval(MarqueeLeft, speed);
		demo.onmouseout = function() {
			MyMar = setInterval(MarqueeLeft, speed);
		}
	} else {
		MyMar = setInterval(MarqueeRight, speed);
		demo.onmouseout = function() {
			MyMar = setInterval(MarqueeRight, speed);
		}
	}
}